package com.iflytek.springboot_medicine.pojo;
import com.iflytek.springboot_medicine.entity.Income;
import lombok.Data;
import java.sql.Date;

@Data
public class IncomePojo {
    private int id;
    private String category;
    private String name;
    private int account;
    private String income_user;
    private Date income_date;

    public IncomePojo() {
    }

    public IncomePojo(Income income) {
        this.id = income.getId();
        if (income.getCate() != null) {
            this.category = income.getCate().getName();
        }
        this.name = income.getName();
        this.account = income.getAccount();
        this.income_user = income.getIncome_user();
        this.income_date = income.getIncome_date();
    }
}
